package com.mzj.saas.mservice.property.common;

/**
 * @author hikari
 * @since 2021-05-26
 */
public enum ExceptionTypeEnum {
    CHARGE(1, "收费"),
    FREE(2, "免费"),
    VACANCY(3, "空置"),
    EXCEPTION(4, "异常");

    public final int type;
    public final String typeName;

    ExceptionTypeEnum(int type, String typeName) {
        this.type = type;
        this.typeName = typeName;
    }

    public static String getTypeName(int type) {
        for (ExceptionTypeEnum value : ExceptionTypeEnum.values()) {
            if (value.getType() == type) {
                return value.typeName;
            }
        }
        return null;
    }

    public int getType() {
        return this.type;
    }
}
